package com.zzyl.nursing.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import java.util.Arrays;
import com.zzyl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zzyl.nursing.mapper.CheckInConfigMapper;
import com.zzyl.nursing.domain.CheckInConfig;
import com.zzyl.nursing.service.ICheckInConfigService;

/**
 * checkConfigService业务层处理
 * 
 * @author xulei
 * @date 2025-07-25
 */
@Service
public class CheckInConfigServiceImpl extends ServiceImpl<CheckInConfigMapper,CheckInConfig> implements ICheckInConfigService
{
    @Autowired
    private CheckInConfigMapper checkInConfigMapper;

    /**
     * 查询checkConfig
     * 
     * @param id checkConfig主键
     * @return checkConfig
     */
    @Override
    public CheckInConfig selectCheckInConfigById(Integer id)
    {
        return checkInConfigMapper.selectById(id);
    }

    /**
     * 查询checkConfig列表
     * 
     * @param checkInConfig checkConfig
     * @return checkConfig
     */
    @Override
    public List<CheckInConfig> selectCheckInConfigList(CheckInConfig checkInConfig)
    {
        return checkInConfigMapper.selectCheckInConfigList(checkInConfig);
    }

    /**
     * 新增checkConfig
     * 
     * @param checkInConfig checkConfig
     * @return 结果
     */
    @Override
    public int insertCheckInConfig(CheckInConfig checkInConfig)
    {
        checkInConfig.setCreateTime(DateUtils.getNowDate());
        return checkInConfigMapper.insert(checkInConfig);
    }

    /**
     * 修改checkConfig
     * 
     * @param checkInConfig checkConfig
     * @return 结果
     */
    @Override
    public int updateCheckInConfig(CheckInConfig checkInConfig)
    {
        checkInConfig.setUpdateTime(DateUtils.getNowDate());
        return checkInConfigMapper.updateById(checkInConfig);
    }

    /**
     * 批量删除checkConfig
     * 
     * @param ids 需要删除的checkConfig主键
     * @return 结果
     */
    @Override
    public int deleteCheckInConfigByIds(Integer[] ids)
    {
        return checkInConfigMapper.deleteByIds(Arrays.asList(ids));
    }

    /**
     * 删除checkConfig信息
     * 
     * @param id checkConfig主键
     * @return 结果
     */
    @Override
    public int deleteCheckInConfigById(Integer id)
    {
        return checkInConfigMapper.deleteById(id);
    }
}
